/*
 * @Author: sdorein sdorein@163.com
 * @Date: 2024-07-26 15:56:53
 * @LastEditors: sdorein sdorein@163.com
 * @LastEditTime: 2024-08-02 16:33:58
 * @FilePath: \vite-as-editor\src\router\index.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
// router/index.ts
import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router';
// 定义路由配置
const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'layout',
    redirect: '/home',
    component: () => import('../layout/index.vue'),
    children: [
      {
        path: '/home',
        name: 'home',
        component: () => import('../layout/home/index.vue')
      },
    ],
  },
];

// 创建路由实例
const router = createRouter({
  history: createWebHistory(),// --process.env.BASE_URL
  routes,
});

export default router;